﻿<Window x:Class="SSLVerifier.Views.Windows.AddServerWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:system="clr-namespace:System;assembly=mscorlib"
        xmlns:vm="clr-namespace:SSLVerifier.API.ViewModels"
        mc:Ignorable="d"
        d:DataContext="{d:DesignInstance vm:AddServerVM}"
        WindowStartupLocation="CenterOwner"
        Background="{StaticResource PanelBackgroundBrush}"
        ResizeMode="NoResize"
        ShowInTaskbar="False"
        Icon="/Views/Images/add_icon.ico"
        Title="Add server"
        Height="125"
        Width="340"
        FocusManager.FocusedElement="{Binding ElementName=ServerNameBox}">
    <Window.DataContext>
        <vm:AddServerVM/>
    </Window.DataContext>
    <StackPanel Margin="0,10,0,0">
        <DockPanel Margin="5,0,0,0" >
            <TextBlock Text="https://" VerticalAlignment="Center"/>
            <TextBox x:Name="ServerNameBox"
                     Width="200"
                     MaxLength="100"
                     ToolTip="Enter server name or IP"
                     Text="{Binding ServerName, UpdateSourceTrigger=PropertyChanged}"/>
            <TextBlock Text=" :" VerticalAlignment="Center"/>
            <ComboBox Text="{Binding Port}"
                      ToolTip="Server port"
                      SelectedValuePath="Content"
                      Width="60"
                      IsEditable="True"
                      IsReadOnly="False"
                      SelectedIndex="1"
                      Margin="0,0,10,0">
                <ComboBoxItem>
                    <system:Int32>25</system:Int32>
                </ComboBoxItem>
                <ComboBoxItem>
                    <system:Int32>443</system:Int32>
                </ComboBoxItem>
                <ComboBoxItem>
                    <system:Int32>636</system:Int32>
                </ComboBoxItem>
                <ComboBoxItem>
                    <system:Int32>993</system:Int32>
                </ComboBoxItem>
            </ComboBox>
        </DockPanel>
        <Border BorderThickness="0,1,0,0" Background="{StaticResource PanelHeaderBackground}" Margin="0,10,0,0">
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,10,10,10">
                <Button Width="60" Content="Ok" Command="{Binding OkCommand}" IsDefault="True" ToolTip="Add entry (Enter)" Margin="0,0,0,0"/>
                <Button Width="60" Content="Close" Click="CloseButton" IsCancel="True" ToolTip="Close dialog (Esc)" Margin="10,0,0,0"/>
            </StackPanel>
        </Border>
    </StackPanel>
</Window>
